<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">
        <ui:define name="content">
            <h:form rendered="#{loginBacking.editSalesForecast}">
                <p:panel header="New SalesForecast Information Calculated">

                    <p:growl id="growl" sticky="true" showDetail="true"/>

                    <h:panelGrid id="update" columns="2" columnClasses="label, value">
                        <h:outputText value="Year of Sales "/>
                        <h:outputText value="#{salesForecastEntityController.selected.yearOfSales}" />

                        <h:outputText value="Month of Sales "/>
                        <h:outputText value="#{salesForecastEntityController.selected.monthOfSales}"/>

                        <h:outputText value="#{salesForecastEntityController.selected.yearOfSales-1} Base Projection"/>
                        <h:outputText value="#{salesForecastEntityController.selected.baseProjection}"/>
                        
                        <h:outputText value="Monthly Adjustment "/>
                        <h:outputText value="#{salesForecastEntityController.selected.monthlyGrowthAdjustment} %"/>
                        

                        <h:outputText value="Adjusted Base Projection "/>
                        <h:outputText value="#{salesForecastEntityController.selected.adjustedBaseProjection} cases" style="color: #D20005"/>

                        <h:outputText value="Future Promotion "/>
                        <h:outputText value="#{salesForecastEntityController.selected.expectedMonthlyPromo} cases"/>

                        <h:outputText value="New Sales Forecast "/>
                        <h:outputText value="#{salesForecastEntityController.selected.forecast} cases" style="color: #D20005"/>

                        

                    </h:panelGrid>
                    <h:commandButton value="Update" onclick="confirm.show() " type="button"/>
                </p:panel>
                <br />
                
                
               
                <h:commandButton action="#{salesForecastEntityController.returnEdit}" value="Back"/>
                 <p:confirmDialog message = " Are you sure ? " showEffect="bounce" hideEffect="explode" header="Initiating Update Process" widgetVar="confirm">
                    
                    <p:commandButton value="Yes Sure" action="#{salesForecastEntityController.update}" update="messages" oncomplete="confirmation.hide()"/>
                    <p:commandButton value ="Not Yet" onclick="confirm.hide()" type="button"/>
                </p:confirmDialog>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
